<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <meta name="renderer" content="webkit" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title>50bus-剧本</title>
    <meta name="keywords" content="50bus" />
    <meta name="copyright" content="50bus.cn" />
    <!-- <meta http-equiv="mobile-agent" content="http://www.50bus.cn/" />
    <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" /> -->
    <link rel="icon" href="/resources/img/favicon.ico" type="image/x-icon" />
    
    <link rel="stylesheet" type="text/css" href="/resources/css/base.css" media="all" />
    <link rel="stylesheet" type="text/css" href="/resources/css/globe.css" media="all" />
    <link rel="stylesheet" type="text/css" href="/resources/css/module-script.css" media="all" />
    <link rel="stylesheet" type="text/css" href="resources/css/module-creative-dadong.css" />
    <script type="text/javascript" src="/resources/js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="/resources/js/jquery.validate.js"></script>
    <script type="text/javascript" src="/resources/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="/resources/js/jquery.form.js"></script>
    <script type="text/javascript" src="/resources/kindeditor/kindeditor.js"></script>
	<script type="text/javascript" src="/resources/kindeditor/lang/zh_CN.js"></script>
</head>
<body>
    <div class="header_wrap">
        <div class="header clearfix">
            <div class="fm980 fl clearfix">
                <a href="/index.html" class="logo fl"></a>
                <ul class="nav_box fl">
                    <li><a href="/creative_list.html">形象创意</a></li>
                    <li><a href="/script_list.html" class="cur">剧本创作</a></li>
                    <li><a href="/render_index.html">动画渲染</a></li>
                    <li><a href="/creative_helper.html">创意助手</a></li>
                </ul>
                <div class="about_box fr">
                    <a href="/about.html">关于我们</a>
                    <#if uid??&&uid!="">
	                    <a href="/user/user_work.html">个人空间</a>
	                    <a href="/logout.html">退出</a>
                    <#else>
	                    <a href="/register.html">注册</a>
	                    <a href="/login.html">登录</a>
                    </#if>
                </div>
            </div>
        </div>

    </div>

    <div class="body_wrap">
        <div class="box_2">
            <div class="box_hd fm980">征集剧本编辑</div>
            <div class="box_bd">
                <div class="fm980">
                    <!-- 用户名称 -->
                    <div class="user_name clearfix">
                        <img class="r10 fl" src="/resources/img/eg_user_img.png" />
                        <span class="fz14 ml5 fl">${comp}</span>
                    </div>
                    <!-- 上传封面 -->
                    <div class="cover_upload_box clearfix">
                        <span class="fl cover_img">
                            <img style="width:100%;height:100%;" src="${scriptModel.s_cover}"/>
                        </span>
                        <div class="cover_upload">
                            <p class="mb30" style="position:relative;">
                            	<a class="btn_com_red btn_upload"  href="javascript:void(0);">上传封面</a>
                            </p>
                            <div class="tip_box">
                                <h4>温馨提示： </h4>
                                <p>1.建议上传尺寸  140*209px ,上传格式  JPG/JPEG。</p>
                                <p>2.如果你拥有该作品的“原创著作权”请选择原创分类，并建议在作品上打“水印”。 </p>
                                <p>3.如果分享他人作品或经验，请一定注明原作者姓名或昵称，尊重其他设计师。</p>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- 剧本描述 -->
                <div class="script_desc_box">
                    <form id="script_form" action="/script_editor_publish.html?sid=${scriptModel.sid}" method="POST">
                        <ul class="fm980">
                            <li class="clearfix chose_item">
                                <label>征集类型：</label>
                                <p>
                                    <span id="tv_series" style="cursor:pointer;" class="<#if scriptModel.collect_type="电视剧本">cur</#if>">电视剧本</span>
                                    <span id="movie" style="cursor:pointer;" class="<#if scriptModel.collect_type="电影剧本">cur</#if>" >电影剧本</span>
                                    <span id="micromovie" style="cursor:pointer;" class="<#if scriptModel.collect_type="微电影">cur</#if>">微电影</span>
                                    <span id="flash" style="cursor:pointer;" class="<#if scriptModel.collect_type="动画">cur</#if>">动画</span>
                                </p>
                            </li>
                            <li class="clearfix chose_item">
                                <label>题材：</label>
                                <p>
                                    <span id="theme_one" style="cursor:pointer;" class="<#if scriptModel.theme="主旋律">cur</#if>" >主旋律</span>
                                    <span id="theme_two" style="cursor:pointer;" class="<#if scriptModel.theme="反特/谍战">cur</#if>" >反特/谍战</span>
                                    <span id="theme_three" style="cursor:pointer;" class="<#if scriptModel.theme="革命">cur</#if>" >革命</span>
                                    <span id="theme_four" style="cursor:pointer;" class="<#if scriptModel.theme="战争">cur</#if>" >战争</span>
                                </p>
                            </li>
                            <li class="clearfix">
                                <label>标题：</label>
                                <p><input type="text" name="script_title" class="i_text" placeholder="请输入标题" required="true" value="${scriptModel.script_title}" maxlength="20"/></p>
                            </li>
                            <li class="clearfix">
                                <label>剧本需求：</label>
                                <p><textarea class="i_text" name="script_demand"  required="true" maxlength="2000">${scriptModel.script_demand}</textarea></p>
                            </li>
                        </ul>
                        <div class="script_time_box">
                            <ul class="fm980">
                                <li class="clearfix">
                                    <label>开始时间：</label>
                                    <p><input id="start_time" type="text" readonly class="i_text i_text_time" placeholder="2008-06-01" name="start_time" value="${scriptModel.start_time}" required="true" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"/> <a href="javascript:;" class="icon_calendar" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',el:'start_time'})"></a></p>
                                </li>
                                <li class="clearfix">
                                    <label>截稿时间：</label>
                                    <p><input id="end_time" type="text" readonly class="i_text i_text_time" name="end_time" placeholder="2009-06-01" value="${scriptModel.end_time}" required="true" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"/>  <a href="javascript:;" class="icon_calendar" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',el:'end_time'})"></a></p>
                                </li>
                                <li class="clearfix">
                                    <label>投票结束时间：</label>
                                    <p><input id="vote_end_time" readonly type="text" class="i_text i_text_time" name="vote_end_time" placeholder="2009-06-01" value="${scriptModel.vote_end_time}" required="true" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"/>  <a href="javascript:;" class="icon_calendar" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',el:'vote_end_time'})"></a></p>
                                </li>
                                <li class="clearfix">
                                    <label>征集预算：</label>
                                    <p><input type="text" class="i_text i_text_s" name="collect_budget" placeholder="请输入整数金额" readonly="true" value="${scriptModel.collect_budget?string("0.##")}" required="true" number="true" min="0"/> RMB<input style="display:none;" type="text" class="i_text i_text_s" name="collect_budget_l" value="${scriptModel.collect_budget_l}" required="true" number="true" min="0"/></p>
                                </li>
                                <li class="clearfix deal_item">
                                   <!-- <label>版权：</label>
                                    <p>
                                        <input  type="radio" id="copyright_open" checked/> <label for="copyright_open">开源</label>
                                        <input  type="radio" id="copyright_self" /> <label for="copyright_self">独占</label>
                                    </p>-->
                                    <p>
                                        <input type="checkbox" id="deal_item" name="deal_item" required="true" value="0" checked/> <label for="deal_item">我已阅读并接受 <a href="javascript:void();">《50Bus 剧本服务协议》</a></label>
                                    </p>
                                </li>
                                <li class="clearfix">
                                    <p><input type="submit" class="btn_com_purple mt10" value="提交征集" /></p>
                                </li>
                            </ul>
                        </div>
					 <div id="script_type">
					  <input id="collect_type" type="hidden" name="collect_type" value="${scriptModel.collect_type}">
					  <input id="theme" type="hidden" name="theme" value="${scriptModel.theme}">
					  <input id="copyright" type="hidden" name="copyright" value="<#if scriptModel.copyright=on>1<#else>0</#if>">
					  <input id="script_cover" type="hidden" name="script_cover" value="${scriptModel.s_cover}">
					 </div>
                   </form>
                </div>

            </div>

        </div>

    </div>

   <div class="footer">
        <div class="fm980 clearfix">
            <div class="foot_link foot_link1 fl">
                <a href="/creative_list.html">形象创意</a>
                <a href="/script_list.html">剧本创作</a>
                <a href="/render_index.html">动画渲染</a>
                <a href="/creative_helper.html" >创意助手</a>
            </div>
            <div class="foot_link foot_link2 fl">
                <a href="http://zjusp.zju.edu.cn/">浙大科技园</a>
                <a href="http://www.zju.edu.cn/">浙江大学</a>
                <a href="/about.html" >关于我们</a>
            </div>
            <div class="copy_box fr">
                <img class="mb5" src="/resources/img/foot_text.png" />
                <p>&copy; 2013-2016 All right reserved</p>
                <p><a href="">服务条款</a><a href="">隐私条款</a><a href="">法律条款</a></p>
                <p style="display:none;"><a href="" class="share_icon share_sina"></a><a href="" class="share_icon share_wx"></a></p>
            </div>
        </div>
    </div>

<link rel="stylesheet" href="/resources/kindeditor/themes/default/default.css" />
<script type="text/javascript">
$(function(){
		//验证表单
		$("#script_form").validate({
			messages: { 
				script_title: { 
					required: "请输入标题", 
					maxlength: "标题不能超过{0}字"
				}, 
				script_demand: { 
					required: "请输入剧本需求", 
					maxlength: "剧本需求不能超过{0}字"
				}, 
				start_time: { 
					required: "请选择开始时间"
			    },
			    end_time: { 
					required: "请选择截稿时间"
			    },
			    vote_end_time: { 
					required: "请选择投票结束时间"
			    },
			    deal_item:{
					required:"请先阅读注册条约"
				},
				collect_budget:{
					required:"请输入预算"
				}
			},
			errorElement: "em",
			errorPlacement: function (error, element) { 
		  		if (element.is(':radio') || element.is(':checkbox')) {
		      		var eid = element.attr('name');
		      		error.appendTo(element.parent());
		  		} else {
		      		error.appendTo(element.closest("p"));
		 		}
			},
			submitHandler:function(form){
			  if($("#script_cover").val()=="")
		        {
		        	alert("请上传封面");
		        }
		      	else
		        {
		      	    formSubmit($("#script_form"));
		        }
		    } 
		});
		
		var editor = KindEditor.editor({
			allowFileManager : true
		});
		
		$('.btn_upload').click(function() {
			editor.loadPlugin('image', function() {
				editor.plugin.imageDialog({
					showRemote : false,
					imageUrl : $("#script_cover").val(),
					clickFn : function(url, title, width, height, border, align) {
						$(".cover_img img").attr('src',url);
						$("#script_cover").val(url);
						editor.hideDialog();
					}
				});
			});
		});
})
		
$(function(){
	$("#tv_series").click(function(){
		$("#movie").removeClass("cur");
		$("#micromovie").removeClass("cur");
		$("#flash").removeClass("cur");
		$(this).toggleClass("cur");
		$("#collect_type").val($("#tv_series").html());
	});
	$("#movie").click(function(){
		$("#tv_series").removeClass("cur");
		$("#micromovie").removeClass("cur");
		$("#flash").removeClass("cur");
		$(this).toggleClass("cur");
		$("#collect_type").val($("#movie").html());
	});
	$("#micromovie").click(function(){
		$("#tv_series").removeClass("cur");
		$("#movie").removeClass("cur");
		$("#flash").removeClass("cur");
		$(this).toggleClass("cur");
		$("#collect_type").val($("#micromovie").html());
	});
	$("#flash").click(function(){
		$("#tv_series").removeClass("cur");
		$("#movie").removeClass("cur");
		$("#micromovie").removeClass("cur");
		$(this).toggleClass("cur");
		$("#collect_type").val($("#flash").html());
	});
});

$(function(){
	$("#theme_one").click(function(){
		$("#theme_two").removeClass("cur");
		$("#theme_three").removeClass("cur");
		$("#theme_four").removeClass("cur");
		$(this).toggleClass("cur");
		$("#theme").val($("#theme_one").html());
	});
});
$(function(){
	$("#theme_two").click(function(){
		$("#theme_one").removeClass("cur");
		$("#theme_three").removeClass("cur");
		$("#theme_four").removeClass("cur");
		$(this).toggleClass("cur");
		$("#theme").val($("#theme_two").html());
	});
});
$(function(){
	$("#theme_three").click(function(){
		$("#theme_one").removeClass("cur");
		$("#theme_two").removeClass("cur");
		$("#theme_four").removeClass("cur");
		$(this).toggleClass("cur");
		$("#theme").val($("#theme_three").html());
	});
});
$(function(){
	$("#theme_four").click(function(){
		$("#theme_one").removeClass("cur");
		$("#theme_two").removeClass("cur");
		$("#theme_three").removeClass("cur");
		$(this).toggleClass("cur");
		$("#theme").val($("#theme_four").html());
	});
});
$(function(){
	$("#copyright_open").click(function(){
		$("#copyright").val(1);
	});
});
$(function(){
	$("#copyright_self").click(function(){
		$("#copyright").val(0);
	});
});
</script>
<script type="text/javascript" src="/resources/js/page-index.js"></script>
<script type="text/javascript">
	<#if uid??&&uid!="">
    	$.post("/common/getUserName.json",{"uid":${uid}},function(data){
    		if(data.name){
    			$('a[href="/user/user_work.html"]').html(data.name+"个人空间");
    		}
    	});
	 </#if>
</script>
</body>
</html>